//
//  UserLogin.swift
//  FNiOS
//
//  Created by mac on 2023/3/14.
//

import SwiftUI


struct UserLogin: View {
    @Environment(\.presentationMode) var presentationMode:Binding<PresentationMode>
    @State private var showAlert = false
    var body: some View {
        
        Text("返回!")
            // 设置对话框
            .alert(isPresented: $showAlert, content: {
                Alert(title: Text("要返回"), message: Text("点击确认返回"))
            })
            .onTapGesture {
                showAlert = true
                presentationMode.wrappedValue.dismiss()
            }
    }
}

struct UserLogin_Previews: PreviewProvider {
    static var previews: some View {
        UserLogin()
    }
}
